"use strict";

export class sourcecode {
    /**
     * 
     * @param {string} s source code string
     * @param {Date} savetime 
     * @param {int} version 
     */
    constructor(s, savetime=new Date(), version=0) {
        this.s = s;
        this.savetime = savetime;
        this.version = version;
    }
}

export class sourcecode_location {
    /**
     *
     * @param {int} start_line
     * @param {int} start_column
     * @param {int} end_line
     * @param {int} end_column
     */
    constructor(start_line, start_column, end_line = null, end_column = null) {
        this.start_line = start_line;
        this.start_column = start_column;
        end_line ? this.end_line = end_line : this.end_line = start_line;
        end_column ? this.end_column = end_column : this.end_column = start_column;
    }
}
